import 'package:flutter/material.dart';

//Flutter 富文本
void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    //脚手架
    return Scaffold(
      appBar: AppBar(
        title: Text('标题'),
        backgroundColor: Colors.blue,
        foregroundColor: Colors.white,
      ),

      // floatingActionButton: FloatingActionButton(
      //   onPressed: () {},
      //   child: Icon(Icons.add),
      //   backgroundColor: Colors.blue,
      //   foregroundColor: Colors.white,
      //   hoverColor: Colors.blue,
      //   splashColor: Colors.black,
      //
      //   // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(40)),
      //   elevation: 20,
      //   focusElevation: 20,
      //   hoverElevation: 20,
      //   highlightElevation: 20,
      //   disabledElevation: 10,
      // ),
      // floatingActionButton: FloatingActionButton.small(
      //   onPressed: () {},
      //   child: Icon(Icons.add),
      // ),
      // floatingActionButton: FloatingActionButton.large(
      //   onPressed: () {},
      //   child: Icon(Icons.add),
      // ),
      floatingActionButton: FloatingActionButton.extended(
        onPressed: () {},
        icon: Icon(Icons.add),
        label: Text('添加'),
      ),
      floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
      body: Center(
        child: Container(width: 100, height: 100, color: Colors.grey),
      ),
      // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
